<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <style>
        .parent p:first-child{
            color: red;
        }
        .parent p:first-of-type{
            color: blue;
        }
    </style>

    <div class="parent">
        <p>1111</p>
        <p>2222</p>
        <p>3333</p>
    </div>
    <div class="parent">
      <div>4444</div>
      <h1>555</h1>
        <p>666</p>
        <p>777</p>
    </div>
</body>
</html>